1 using UnityEngine;
2
3 namespace
ProceduralToolkit.Examples.Primitives
4 {
5     
[RequireComponent(typeof (MeshRenderer), typeof (MeshFilter))]
6     
public class FlatSpheroid : MonoBehaviour
7     {
8         
public float radius = 0.75f;
9         
public float height = 1f;
10         
public int horizontalSegments = 16;
11         
public int verticalSegments = 16;
12
13         
private void Start()
14         {
15             GetComponent<MeshFilter>().mesh = MeshE.FlatSpheroid(radius, height, horizontalSegments, verticalSegments);
16         }
17     }
18 }


Gõ tìm kiếm nhanh...